<?php session_start(); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Information (4/4)</title>
<script type="text/javascript" src="validateInformation.js" ></script>


<?php
require_once 'LogView.php';
if(isset($_POST['Done']))
{
	$f = LogView::checkDuplicate($_SESSION['snum']);
	/*if($f){
		echo'<script>alert("This check-in instance already exists.")</script>';
	}else{
		LogView::insertLog($_SESSION['snum'],$_SESSION['date'],$_SESSION['term'],$_SESSION['roomNo'],"currentResident",$_SESSION['lname'],$_SESSION['mname'],$_SESSION['fname']);
	}*/
	
	LogView::insertLog($_SESSION['snum'],$_SESSION['date'],$_SESSION['term'],$_SESSION['roomNo'],"currentResident",$_SESSION['lname'],$_SESSION['mname'],$_SESSION['fname']);




}
?>
<link href="style.css" rel="stylesheet" type="text/css" />
</head>

<body>
<table width="100%" border="0" cellpadding="1">
 
  <tr>
    <td>&nbsp;</td>
    <td class="subBanner"><strong> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Resident's Basic Information Form</strong></td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td><form id="form1" name="form1" method="post" action="" >
      <table width="100%" border="0" cellpadding="1">
        <tr>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td><strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </strong>&nbsp;</td>
          <td id="lname2" class="error">&nbsp;</td>
        </tr>
        <tr>
          <td class="confirm">Student Number</td>
		  <td width="1%" class="confirm1">&nbsp;</td>
          <td width="31%" class="confirm1"><?php echo $_SESSION['snum'] ?></td>
          <td width="23%" id="gname" class="error">&nbsp;</td>
        </tr>
		<tr>
		  <td class="confirm">Last name</td>
		  <td class="confirm1">&nbsp;</td>
		  <td class="confirm1"><?php echo $_SESSION['lname'] ?></td>
		  <td id="gname4" class="error">&nbsp;</td>
		  </tr>
		<tr>
		  <td class="confirm">First name</td>
		  <td class="confirm1">&nbsp;</td>
		  <td class="confirm1"><?php echo $_SESSION['fname'] ?></td>
		  <td id="gname3" class="error">&nbsp;</td>
		  </tr>
		<tr>
		  <td class="confirm">Middle name</td>
		  <td class="confirm1">&nbsp;</td>
		  <td class="confirm1"><?php echo $_SESSION['mname'] ?></td>
		  <td id="gname2" class="error">&nbsp;</td>
		  </tr>
		<tr>
          <td class="confirm">Term</td>
          <td width="1%" class="confirm1">&nbsp;</td>
          <td width="31%" class="confirm1"><?php echo strtoupper($_SESSION['term']) ?></td>
          <td width="23%" id="gname" class="error">&nbsp;</td>
        </tr>
		<tr>
          <td class="confirm">Room Number</td>
          <td width="1%" class="confirm1">&nbsp;</td>
          <td width="31%" class="confirm1"><?php echo strtoupper($_SESSION['roomNo']) ?></td>
          <td width="23%" id="gname" class="error">&nbsp;</td>
        </tr>
		<tr>
          <td class="confirm">Date</td>
          <td width="1%" class="confirm1">&nbsp;</td>
          <td width="31%" class="confirm1"><?php echo strtoupper($_SESSION['date']) ?></td>
          <td width="23%" id="gname" class="error">&nbsp;</td>
        </tr>
		
        <tr>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td><input type="submit" name="Done" id="Done" value="Confirm Resident" /></td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
        </tr>
      </table>
    </form></td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
</table>
</body>
</html>
